package Model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Table
@Entity
public class Product {
	private int codProd;
	private String codS;
	private String nombre;
	private String description;
	private double cost;
	private String amount;
	private double Iva;
	private Category category;

	public Product() {
		super();
		// TODO Auto-generated constructor stub
	}

	@Column
	@Id
	@GeneratedValue
	public int getCodProd() {
		return codProd;
	}

	@Column
	public void setCodProd(int codProd) {
		this.codProd = codProd;
	}

	@Column
	public String getCodS() {
		return codS;
	}

	@Column
	public void setCodS(String codS) {
		this.codS = codS;
	}

	@Column
	public String getNombre() {
		return nombre;
	}

	@Column
	public void setNombre(String nombre) {
		this.nombre = nombre;
	}

	@Column
	public String getDescription() {
		return description;
	}

	@Column
	public void setDescription(String description) {
		this.description = description;
	}

	@Column
	public double getCost() {
		return cost;
	}

	@Column
	public void setCost(double cost) {
		this.cost = cost;
	}

	@Column
	public String getAmount() {
		return amount;
	}

	@Column
	public void setAmount(String amount) {
		this.amount = amount;
	}

	@Column
	public double getIva() {
		return Iva;
	}

	@Column
	public void setIva(double iva) {
		Iva = iva;
	}

	@ManyToOne
	@JoinColumn(name = "codCategory", nullable = false)
	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}
}
